package com.qf.fmall.exHandler;

import com.qf.fmall.vo.ResultVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class GlobalExHandler {

    @ExceptionHandler(Exception.class)
    public ResultVo handleEx(Exception e){

        e.printStackTrace();
        return new ResultVo(500, e.getMessage(), "请联系管理员");

    }

}
